import json
import app


def read_data(filename):
    with open(file=filename, mode="r", encoding="utf-8") as f:
        json_data = json.load(f)
        empty_list = []
        for i in json_data:
            empty_list.append(i.values())

        return empty_list


# def read_data(filename):
#     with open(file=filename, mode="r", encoding="utf-8") as f:
#         # print("未转换前", f)
#         json_data = json.load(f)
#         # print(json_data)
#         # 创建空列表
#         empty_list = []
#         for i in json_data:
#             print(i)
#             empty_list.append(tuple(i.values()))
#         return empty_list
#
#
# if __name__ == '__main__':
#     read_data("./data/login_data.json")
if __name__ == '__main__':
    read_data(app.BASE_DIR + "/data/login_data.json")
